package com.ceba.test.base.language.resources;

import java.io.IOException;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.TagSupport;

import com.ceba.test.base.language.ResourceUtils;

public class WebMessagesTag extends TagSupport{
	
    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String resourceName;

    
    public String getResourceName() {
		return resourceName;
	}
	public void setResourceName(String resourceName) {
		this.resourceName = resourceName;
	}
	public int doEndTag() throws JspException
    {
        JspWriter out=pageContext.getOut();
        try {
            out.print(ResourceUtils.getMessage(resourceName));
        } catch (IOException e) {
            e.printStackTrace();
        }
        return EVAL_PAGE;
    }
}
